<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
HttpResponseContext (jersey-bundle 1.9 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="HttpResponseContext (jersey-bundle 1.9 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HttpResponseContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/sun/jersey/api/core/HttpRequestContext.html" title="interface in com.sun.jersey.api.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/sun/jersey/api/core/InjectParam.html" title="annotation in com.sun.jersey.api.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/sun/jersey/api/core/HttpResponseContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="HttpResponseContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.jersey.api.core</FONT>
<BR>
Interface HttpResponseContext</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../com/sun/jersey/spi/container/AdaptingContainerResponse.html" title="class in com.sun.jersey.spi.container">AdaptingContainerResponse</A>, <A HREF="../../../../../com/sun/jersey/spi/container/ContainerResponse.html" title="class in com.sun.jersey.spi.container">ContainerResponse</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>HttpResponseContext</B></DL>
</PRE>

<P>
An abstraction of a HTTP response.
 <p>
 The default state is a HTTP response with a status code of 204 
 (No Content) with no headers and entity.
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.annotation.Annotation[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getAnnotations()">getAnnotations</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the annotations associated with the response entity (if any).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getEntity()">getEntity</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.reflect.Type</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getEntityType()">getEntityType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</A>&lt;java.lang.String,java.lang.Object&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getHttpHeaders()">getHttpHeaders</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the HTTP response headers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Throwable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getMappedThrowable()">getMappedThrowable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the throwable (if any) that was mapped to a response.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getMediaType()">getMediaType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the media type of the response entity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getOriginalEntity()">getOriginalEntity</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the original entity instance that was set by
 <A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setEntity(java.lang.Object)"><CODE>setEntity(java.lang.Object)</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getOutputStream()">getOutputStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an <CODE>OutputStream</CODE> to which an entity may be written.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../javax/ws/rs/core/Response.html" title="class in javax.ws.rs.core">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getResponse()">getResponse</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the response that was set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getStatus()">getStatus</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getStatusType()">getStatusType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#isCommitted()">isCommitted</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ascertain if a response has been committed to the container.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#isResponseSet()">isResponseSet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if the response has been set using the setReponse methods.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setAnnotations(java.lang.annotation.Annotation[])">setAnnotations</A></B>(java.lang.annotation.Annotation[]&nbsp;annotations)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the annotations associated with the response entity (if any).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setEntity(java.lang.Object)">setEntity</A></B>(java.lang.Object&nbsp;entity)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the entity of the response.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setResponse(javax.ws.rs.core.Response)">setResponse</A></B>(<A HREF="../../../../../javax/ws/rs/core/Response.html" title="class in javax.ws.rs.core">Response</A>&nbsp;response)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the response state from a Response instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setStatus(int)">setStatus</A></B>(int&nbsp;status)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the status of the response.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setStatusType(javax.ws.rs.core.Response.StatusType)">setStatusType</A></B>(<A HREF="../../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</A>&nbsp;statusType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the status type of the response.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getResponse()"><!-- --></A><H3>
getResponse</H3>
<PRE>
<A HREF="../../../../../javax/ws/rs/core/Response.html" title="class in javax.ws.rs.core">Response</A> <B>getResponse</B>()</PRE>
<DL>
<DD>Get the response that was set.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the response.</DL>
</DD>
</DL>
<HR>

<A NAME="setResponse(javax.ws.rs.core.Response)"><!-- --></A><H3>
setResponse</H3>
<PRE>
void <B>setResponse</B>(<A HREF="../../../../../javax/ws/rs/core/Response.html" title="class in javax.ws.rs.core">Response</A>&nbsp;response)</PRE>
<DL>
<DD>Set the response state from a Response instance. This replaces a 
 pre-existing response state.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>response</CODE> - the response.</DL>
</DD>
</DL>
<HR>

<A NAME="isResponseSet()"><!-- --></A><H3>
isResponseSet</H3>
<PRE>
boolean <B>isResponseSet</B>()</PRE>
<DL>
<DD>Check if the response has been set using the setReponse methods.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the response has been set.</DL>
</DD>
</DL>
<HR>

<A NAME="getMappedThrowable()"><!-- --></A><H3>
getMappedThrowable</H3>
<PRE>
java.lang.Throwable <B>getMappedThrowable</B>()</PRE>
<DL>
<DD>Get the throwable (if any) that was mapped to a response.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the throwable that was mapped to a response, otherwise null
         if no throwable was mapped to a response.</DL>
</DD>
</DL>
<HR>

<A NAME="getStatusType()"><!-- --></A><H3>
getStatusType</H3>
<PRE>
<A HREF="../../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</A> <B>getStatusType</B>()</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>the status type of the response</DL>
</DD>
</DL>
<HR>

<A NAME="setStatusType(javax.ws.rs.core.Response.StatusType)"><!-- --></A><H3>
setStatusType</H3>
<PRE>
void <B>setStatusType</B>(<A HREF="../../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</A>&nbsp;statusType)</PRE>
<DL>
<DD>Set the status type of the response.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusType</CODE> - the status type.</DL>
</DD>
</DL>
<HR>

<A NAME="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
int <B>getStatus</B>()</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>the status of the response</DL>
</DD>
</DL>
<HR>

<A NAME="setStatus(int)"><!-- --></A><H3>
setStatus</H3>
<PRE>
void <B>setStatus</B>(int&nbsp;status)</PRE>
<DL>
<DD>Set the status of the response.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>status</CODE> - the status.</DL>
</DD>
</DL>
<HR>

<A NAME="getEntity()"><!-- --></A><H3>
getEntity</H3>
<PRE>
java.lang.Object <B>getEntity</B>()</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>the entity of the response.</DL>
</DD>
</DL>
<HR>

<A NAME="getEntityType()"><!-- --></A><H3>
getEntityType</H3>
<PRE>
java.lang.reflect.Type <B>getEntityType</B>()</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>the type of the entity.</DL>
</DD>
</DL>
<HR>

<A NAME="getOriginalEntity()"><!-- --></A><H3>
getOriginalEntity</H3>
<PRE>
java.lang.Object <B>getOriginalEntity</B>()</PRE>
<DL>
<DD>Get the original entity instance that was set by
 <A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setEntity(java.lang.Object)"><CODE>setEntity(java.lang.Object)</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setEntity(java.lang.Object)"><!-- --></A><H3>
setEntity</H3>
<PRE>
void <B>setEntity</B>(java.lang.Object&nbsp;entity)</PRE>
<DL>
<DD>Set the entity of the response.
 <p>
 If the entity is an instance of <A HREF="../../../../../javax/ws/rs/core/GenericEntity.html" title="class in javax.ws.rs.core"><CODE>GenericEntity</CODE></A> then the entity
 and entity type are set from the entity and type of that
 <A HREF="../../../../../javax/ws/rs/core/GenericEntity.html" title="class in javax.ws.rs.core"><CODE>GenericEntity</CODE></A>. Otherwise, the entity is set from the entity 
 parameter and the type is the class of that parameter.
 <p>
 If it is necessary to wrap an entity that may have been set with an
 instance of <A HREF="../../../../../javax/ws/rs/core/GenericEntity.html" title="class in javax.ws.rs.core"><CODE>GenericEntity</CODE></A> then utilize the
 <A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#getOriginalEntity()"><CODE>getOriginalEntity()</CODE></A>, for example:
 <blockquote><pre>
     HttpResponseContext r = ...
     r.setEntity(wrap(getOriginalEntity()));
 </blockquote></pre>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>entity</CODE> - the entity.</DL>
</DD>
</DL>
<HR>

<A NAME="getAnnotations()"><!-- --></A><H3>
getAnnotations</H3>
<PRE>
java.lang.annotation.Annotation[] <B>getAnnotations</B>()</PRE>
<DL>
<DD>Get the annotations associated with the response entity (if any).
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the annotations.</DL>
</DD>
</DL>
<HR>

<A NAME="setAnnotations(java.lang.annotation.Annotation[])"><!-- --></A><H3>
setAnnotations</H3>
<PRE>
void <B>setAnnotations</B>(java.lang.annotation.Annotation[]&nbsp;annotations)</PRE>
<DL>
<DD>Set the annotations associated with the response entity (if any).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>annotations</CODE> - the annotations.</DL>
</DD>
</DL>
<HR>

<A NAME="getHttpHeaders()"><!-- --></A><H3>
getHttpHeaders</H3>
<PRE>
<A HREF="../../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</A>&lt;java.lang.String,java.lang.Object&gt; <B>getHttpHeaders</B>()</PRE>
<DL>
<DD>Get the HTTP response headers. The returned map is case-insensitive
 with respect to the keys (header values). The method <A HREF="../../../../../com/sun/jersey/api/core/HttpResponseContext.html#setResponse(javax.ws.rs.core.Response)"><CODE>setResponse(javax.ws.rs.core.Response)</CODE></A> 
 will replace any headers previously set.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a mutable map of headerd.</DL>
</DD>
</DL>
<HR>

<A NAME="getMediaType()"><!-- --></A><H3>
getMediaType</H3>
<PRE>
<A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A> <B>getMediaType</B>()</PRE>
<DL>
<DD>Get the media type of the response entity.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the media type or null if there is no response entity.</DL>
</DD>
</DL>
<HR>

<A NAME="getOutputStream()"><!-- --></A><H3>
getOutputStream</H3>
<PRE>
java.io.OutputStream <B>getOutputStream</B>()
                                     throws java.io.IOException</PRE>
<DL>
<DD>Get an <CODE>OutputStream</CODE> to which an entity may be written.
 <p>
 The first byte written will result in the writing of thethe status code 
 and headers.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the output stream
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an IO error occurs</DL>
</DD>
</DL>
<HR>

<A NAME="isCommitted()"><!-- --></A><H3>
isCommitted</H3>
<PRE>
boolean <B>isCommitted</B>()</PRE>
<DL>
<DD>Ascertain if a response has been committed to the container.
 <p>
 A response is committed if the status code, headers have been
 written to the container.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the response has been committed.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HttpResponseContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/sun/jersey/api/core/HttpRequestContext.html" title="interface in com.sun.jersey.api.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/sun/jersey/api/core/InjectParam.html" title="annotation in com.sun.jersey.api.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/sun/jersey/api/core/HttpResponseContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="HttpResponseContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2011 <a href="http://www.oracle.com/">Oracle Corporation</a>. All Rights Reserved.
</BODY>
</HTML>
